﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.SqlClient;
using System.Data;

namespace WinformText0001
{
    
    class DbHelper
    {
        private static readonly string conString = "server=.;database=Admin3000;uid=sa;pwd=lz20001130";

        public static DataTable TaberPrint(string sql)
        {
            SqlConnection connection = new SqlConnection(conString);
            SqlDataAdapter adapter = new SqlDataAdapter(sql,connection);
            DataTable dt = new DataTable();
            adapter.Fill(dt);
            connection.Open();
            return dt;
           

        }
        
        

    }
}
;